package com.wanda.service.impl;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.wanda.dao.CustomerDAO;
import com.wanda.model.CustomerModel;
import com.wanda.service.CustomerService;

@Service
public class CustomerServiceImpl implements CustomerService {
	
	@Autowired	
	private CustomerDAO customerDAO;
	

	public int addCustomer(CustomerModel customer) {
		// TODO Auto-generated method stub
		return customerDAO.addCustomer(customer);
	}

	public int updateCustomer(CustomerModel customer) {
		// TODO Auto-generated method stub
		System.err.println("customerName13:"+customer.getCustomer_name());
		return customerDAO.updateCustomer(customer);
	}

	public int deleteCustomer(CustomerModel customer) {
		// TODO Auto-generated method stub
		return customerDAO.deleteCustomer(customer);
	}

	public List<CustomerModel> selectAll(String delete_state) {
		// TODO Auto-generated method stub
		return customerDAO.selectAll(delete_state);
	}

	public List<CustomerModel> selectById(String customer_id) {
		// TODO Auto-generated method stub
		return customerDAO.selectById(customer_id);
	}

	public List<CustomerModel> selectBySql(int page,int rows,String SearchSql) {
		// TODO Auto-generated method stub
		return customerDAO.selectBySql(page,rows,SearchSql);
	}

}
